package com.gwnet.cabinet.enums;

/**
 * @author: WangLiang
 * @date: 2024/7/23 15:06
 */
public enum OpenTypeEnum {

    ALLOCATION_OPEN(1,"分配并开箱"),

    ALLOCATION_NOT_OPEN(2,"分配但不开箱"),

    TAKE_BOX_OPEN_END(1,"取出并结束"),

    TAKE_BOX_OPEN_NOT_END(2,"中途使用，取出但不结束订单");



    private Integer code;
    private String desc;

    OpenTypeEnum(Integer code,String desc){
        this.code = code;
        this.desc = desc;
    }

    public Integer code() {
        return code;
    }

    public String desc() {
        return desc;
    }

    public static OpenTypeEnum instance(Integer value) {
        OpenTypeEnum[] enums = values();
        for (OpenTypeEnum statusEnum : enums) {
            if (statusEnum.code().equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }
}
